<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[id]" value="{$row.id}"/>
    {if condition="$row.worker_id == 0"}
    <div class="alert alert-danger-light">
        本单已在师傅端任务大厅等待师傅抢单
    </div>
    {/if}
    {if condition="$row.worker_id > 0"}
    <div class="alert alert-danger-light">
        当前已经分配了师傅【{$row['worker_name']}】，如果重新派单，将会取消该师傅的派单！
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sn')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sn" disabled data-rule="required" class="form-control" name="row[sn]" type="text" value="{$row.sn|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">派单方式:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="row[status]-1"><input id="row[status]-1" name="row[status]" type="radio" value="1" checked /> 系统随机派单</label> 
                <label for="row[status]-2"><input id="row[status]-2" name="row[status]" type="radio" value="2"  /> 手工派单</label> 
            </div>
        </div>
    </div>
    <div class="form-group hidden" data-favisible="status=2" >
        <label class="control-label col-xs-12 col-sm-2">师傅:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-worker_id"  
            class="form-control selectpage" 
            data-source="deerhome/worker/index" 
            autocomplete="off"
            placeholder="请输入师傅ID/姓名/电话号码进行搜索"
            data-field="utel" 
            data-search-field="id,uname,utel"
            data-pagination="true"
            data-format-item="ID{id} / {uname} / {utel}"
            name="row[worker_id]" type="text" 
            value="{$row.worker_id>0?$row.worker_id:''}">
        </div>
    </div>
    

    <div class="form-group layer-footer">
        <div class="col-xs-12 col-sm-12">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
<style>
    .control-label{
        font-weight: bold !important;
    }
</style>